//调用接口配置文件
import { request } from 'config/request'
import config from 'config/config'
// 定义接口

//新增
export async function addFun(params) {
    return request({
        url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/add`,
        method: 'POST',
        data: params,
    });
  };
//编辑
export async function editFun(params) {
  return request({
      url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/edit`,
      method: 'POST',
      data: params,
  });
};
//查询
export async function queryInfo(params) {
    return request({
        url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/queryById`,
        method: 'GET',
        data: params,
    });
  };
// 初始化
export async function getFirst(params) {
  return request({
      url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/weeklyInit/${params.startTime}/${params.endTime}?status=${params.status}`,
      method: 'GET',
  });
};

//修改环比原因
export async function updatepriceRatioReason(params) {
  return request({
      url: `${config.aheadPlan}admin/groupWeekly/groupWeekly/updatepriceRatioReason`,
      method: 'POST',
      data: params,
  });
};